package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SdCustParameter generated by hbm2java
 */
@Entity
@Table(name="sd_cust_parameter"
    ,catalog="ncsc_erp"
)
public class SdCustParameter  implements java.io.Serializable {


     private SdCustParameterId id;
     private SdCust sdCust;
     private SysParameterMaster sysParameterMaster;
     private String custParamStringVal;
     private BigDecimal custParamNumberVal;

    public SdCustParameter() {
    }

	
    public SdCustParameter(SdCustParameterId id, SdCust sdCust, SysParameterMaster sysParameterMaster) {
        this.id = id;
        this.sdCust = sdCust;
        this.sysParameterMaster = sysParameterMaster;
    }
    public SdCustParameter(SdCustParameterId id, SdCust sdCust, SysParameterMaster sysParameterMaster, String custParamStringVal, BigDecimal custParamNumberVal) {
       this.id = id;
       this.sdCust = sdCust;
       this.sysParameterMaster = sysParameterMaster;
       this.custParamStringVal = custParamStringVal;
       this.custParamNumberVal = custParamNumberVal;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="custNo", column=@Column(name="CUST_NO", nullable=false) ), 
        @AttributeOverride(name="custParamNo", column=@Column(name="CUST_PARAM_NO", nullable=false) ) } )
    public SdCustParameterId getId() {
        return this.id;
    }
    
    public void setId(SdCustParameterId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_NO", nullable=false, insertable=false, updatable=false)
    public SdCust getSdCust() {
        return this.sdCust;
    }
    
    public void setSdCust(SdCust sdCust) {
        this.sdCust = sdCust;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_PARAM_NO", nullable=false, insertable=false, updatable=false)
    public SysParameterMaster getSysParameterMaster() {
        return this.sysParameterMaster;
    }
    
    public void setSysParameterMaster(SysParameterMaster sysParameterMaster) {
        this.sysParameterMaster = sysParameterMaster;
    }

    
    @Column(name="CUST_PARAM_STRING_VAL", length=500)
    public String getCustParamStringVal() {
        return this.custParamStringVal;
    }
    
    public void setCustParamStringVal(String custParamStringVal) {
        this.custParamStringVal = custParamStringVal;
    }

    
    @Column(name="CUST_PARAM_NUMBER_VAL", precision=15, scale=4)
    public BigDecimal getCustParamNumberVal() {
        return this.custParamNumberVal;
    }
    
    public void setCustParamNumberVal(BigDecimal custParamNumberVal) {
        this.custParamNumberVal = custParamNumberVal;
    }




}


